import request from '@/utils/request'

// 查询课程毕业要求列表
export function listRequirement(query) {
  return request({
    url: '/request/requirement/list',
    method: 'get',
    params: query
  })
}

// 查询课程毕业要求详细
export function getRequirement(requirementId) {
  return request({
    url: '/request/requirement/' + requirementId,
    method: 'get'
  })
}

// 新增课程毕业要求
export function addRequirement(data) {
  return request({
    url: '/request/requirement',
    method: 'post',
    data: data
  })
}

// 修改课程毕业要求
export function updateRequirement(data) {
  return request({
    url: '/request/requirement',
    method: 'put',
    data: data
  })
}

// 删除课程毕业要求
export function delRequirement(requirementId) {
  return request({
    url: '/request/requirement/' + requirementId,
    method: 'delete'
  })
}

// 获取专业列表
export function getMajors() {
  return request({
    url: 'chengji/major/list',
    method: 'get'
  })
}

// 获取课程列表
export function getCourses() {
  return request({
    url: 'score/course/list',
    method: 'get'
  })
}
